<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>jQuery.get(url,[data],[callback])</title>
<meta name="keywords" content="jQuery 1.2 API Reference,Visual jQuery 1.2,jQuery doc,jQuery API,jQuery,jQuery 1.2 API 参考文档中文版,中文版" />
<meta name="description" content="jQuery 1.2 API 文档中文版，提供最新版 jQuery 开发帮助。" />
<link rel="stylesheet" type="text/css" href="../../style/jqueryapi.css" />
<script type="text/javascript" src="../../style/lib/jquery126.js"></script>
 </script>
<script type="text/javascript" src="../../style/jqueryapi.js"></script>
<link rel="shortcut icon" href="../../style/img/favicon.ico" />
</head>
<body>
<div id="topnav">
		<a href="http://www.jQuery.com/" title="jQuery官网" target="_blank" class="topnav">jQuery官网</a>
	<span class="topnav">|</span>
	<a href="http://jquery.org.cn/" title="jQuery中文网站" target="_blank" class="topnav">jQuery中文网站</a>
	<span class="topnav">|</span>
	<a href="http://www.cn-cuckoo.com/" title="1.1版译者" target="_blank" class="topnav">为之漫笔</a>
	<span class="topnav">|</span>
	<a href="http://shawphy.com/" title="1.2版翻译整理者" target="_blank" class="topnav">Shawphy</a>
    <span class="topnav">|</span>
	<a href="http://www.51toria.cn" title="CHM文档制作者:一揪" target="_blank" class="topnav">CHM文档制作者</a> 
	<span class="topnav">|</span>
	<a href="http://dl.getdropbox.com/u/81097/jQueryAPI_CHM.CHM" title="" target="_blank" class="topnav">CHM最新版本下载</a> 
</div>
<hr style="color:#595959;" />

<div class="content">
				<h1>jQuery.get(url,[data],[callback])</h1>
				<div class="desc"><div>通过远程 HTTP GET 请求载入信息。</div> <div class="longdesc">这是一个简单的 GET 请求功能以取代复杂 $.ajax 。请求成功时可调用回调函数。如果需要在出错时执行函数，请使用 $.ajax。</div></div>
				<hr />
				<div class="desc"><div>Load a remote page using an HTTP GET request.</div> <div class="longdesc">This is an easy way to send a simple GET request to a server without having to use the more complex $.ajax function. It allows a single callback function to be specified that will be executed when the request is complete (and only if the response has a successful response code). If you need to have both error and success callbacks, you may want to use $.ajax.</div></div>
				<h2>返回值</h2>
				<p class="indent">XMLHttpRequest</p>
				<h2>参数</h2>
				<p class="indent"><strong>url </strong>(String) : 待载入页面的URL地址</p>
				<p class="indent"><strong>data </strong>(Map) : (可选) 待发送 Key/value 参数。</p>
				<p class="indent"><strong>callback </strong>(Function) : (可选) 载入成功时回调函数。</p>
				<h2>示例</h2>
				<p class="indent">
					请求 test.php 网页，忽略返回值。 
				</p>
				<p class="indent"><strong>jQuery 代码:</strong></p>
				<div class="code">
					$.get("test.php"); 
				</div>
				<hr />
				<p class="indent">
					请求 test.php 网页，传送2个参数，忽略返回值。 
				</p>
				<p class="indent"><strong>jQuery 代码:</strong></p>
				<div class="code">
					$.get("test.php", { name: "John", time: "2pm" } ); 
				</div>
				<hr />
				<p class="indent">
					显示 test.php 返回值(HTML 或 XML，取决于返回值)。
				</p>
				<p class="indent"><strong>jQuery 代码:</strong></p>
				<div class="code">
					$.get("test.php", function(data){<br/>
&nbsp; alert("Data Loaded: " + data);<br/>
});
				</div>
				<hr />
				<p class="indent">
					显示 test.cgi 返回值(HTML 或 XML，取决于返回值)，添加一组请求参数。
				</p>
				<p class="indent"><strong>jQuery 代码:</strong></p>
				<div class="code">
					$.get("test.cgi", { name: "John", time: "2pm" },<br/>
&nbsp; function(data){<br/>
&nbsp;&nbsp;&nbsp; alert("Data Loaded: " + data);<br/>
&nbsp; });
				</div>
<p class="indent" style="text-align:center;">本手册由<a href="www.51toria.cn">一揪</a>整理编辑,并保持长期更新,最新版本请自行查找</p>
</div>

</body>
</html>
